package com.lftea.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.flex.remoting.RemotingDestination;
import org.springframework.flex.remoting.RemotingInclude;
import org.springframework.stereotype.Service;

import com.lftea.dao.ICustomerDAO;
import com.lftea.po.Customer;
import com.lftea.service.ICustomerService;

@Service("customerServiceImpl")
@RemotingDestination
public class CustomerServiceImpl implements ICustomerService {

	@Resource(name = "customerDAOImpl")
	private ICustomerDAO customerDAOImpl;

	@RemotingInclude
	public List<Customer> findAll() {
		return customerDAOImpl.findAll();
	}

	@RemotingInclude
	public Customer findById(long customerId) {
		return customerDAOImpl.findById(customerId);
	}

	@RemotingInclude
	public void remove(Customer customer) {
		customerDAOImpl.remove(customer);
	}

	@RemotingInclude
	public void save(Customer customer) {
		customerDAOImpl.save(customer);
	}

}
